package cc.iotkit.data.dao;

import cc.iotkit.data.model.TbArea;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface TbAreaRepository extends JpaRepository<TbArea, Long> {
    @Query(value = "SELECT * FROM area where uid = ?1", nativeQuery = true)
    Page<TbArea> findAllByUid(String uid,Pageable pageable);
    @Query(value = "SELECT * FROM area ", nativeQuery = true)
    Page<TbArea> findAllByUid( Pageable pageable);
}